<template>
	<view class="hot" :style="{backgroundImage: 'url(' + BASE_URL + '/upload/hot.png)'}">
		<view>
			<view class="d-flex j-sb a-center mb10">
				<view class="title">热门商品</view>
			</view>
			<view class="w100p mb10">
				<u--image :showLoading="true" :src="itemData[0].showUrl" width="100%" height="220rpx" radius="16rpx"
					@click="gotoDetail(itemData[0])"></u--image>
			</view>
			<view class="w100p d-flex j-sb a-center">
				<view>
					<u--image :showLoading="true" :src="itemData[1].showUrl" width="220rpx" height="280rpx" radius="16rpx"
						@click="gotoDetail(itemData[1])"></u--image>
				</view>
				<view>
					<u--image :showLoading="true" :src="itemData[2].showUrl" width="220rpx" height="280rpx" radius="16rpx"
						@click="gotoDetail(itemData[2])"></u--image>
				</view>
				<view>
					<u--image :showLoading="true" :src="itemData[3].showUrl" width="220rpx" height="280rpx" radius="16rpx"
						@click="gotoDetail(itemData[3])"></u--image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		BASE_URL
	} from "@/utils/common.js"
	
	export default {
		components: {},
		data() {
			return {
				BASE_URL: BASE_URL
			};
		},
		props: ['itemData'],
		created() {},
		methods: {
			scroll(e) {},

			/*跳转产品详情*/
			gotoDetail(data) {
				if (data.investmentType == 0) {
					uni.navigateTo({
						url: "/subpkg/goods-detail/goods-detail?productCode=" + data.productCode
					});
				} else {
					uni.navigateTo({
						url: "/subpkg/richText/richText?productCode=" + data.productCode
					});
				}
			}
		}
	};
</script>

<style lang="scss" scoped>
	.hot {
		height: 668rpx;
		padding: 30rpx 20rpx;
		box-sizing: border-box;
		// background: #77c7a2;
		

		.title {
			font-size: 36rpx;
			font-family: Source Han Sans CN, Source Han Sans CN-500;
			font-weight: 500;
			color: #ffffff;
		}
	}
</style>